import request from '@/utils/request'

// 查询店铺商品列表
export function listGood(query) {
  return request({
    url: '/erp/good/list',
    method: 'get',
    params: query
  })
}

// 查询店铺商品详细
export function getGood(mallGoodId) {
  return request({
    url: '/erp/good/' + mallGoodId,
    method: 'get'
  })
}

// 新增店铺商品
export function addGood(data) {
  return request({
    url: '/erp/good',
    method: 'post',
    data: data
  })
}

// 修改店铺商品
export function updateGood(data) {
  return request({
    url: '/erp/good',
    method: 'put',
    data: data
  })
}

// 删除店铺商品
export function delGood(mallGoodId) {
  return request({
    url: '/erp/good/' + mallGoodId,
    method: 'delete'
  })
}
//查询店铺信息
export function getMall(){
  return request({
    url:'/erp/mall/ByMall',
    method:'get',
  })
}
export function  getDePot(){
  return request({
    url:'/erp/depot/selectByDepotVO',
    method:'get',
  })
}

export function synchronousGood(data){
  return request({
    url:"/erp/goodMap/synchronousGood",
    method:'post',
    data:data
  })
}
export function mappings(data){
  return request({
    url:'/erp/goodMap/AddGoodMap',
    method:'post',
    data:data
  })
}
export function batchMapper(mallId,depotId){
  return request({
    url:'/erp/goodMap/batchEroGoodMap'+"/"+mallId+"/"+depotId,
    method:"post"
  })
}
export function deleteSku(data){
  return request({
      url:'/erp/good/deleteSku',
      method:'post',
      data:data
  })
}
